/**
* Copyright @ 2023 iAuto (Shanghai) Co., Ltd.
* All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are NOT permitted except as agreed by
* iAuto (Shanghai) Co., Ltd.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/


import { ModalProps,SpinProps } from 'antd';
import React from 'react';
export interface CustomModalProps extends ModalProps {
    children?: React.ReactNode
}
export interface CustomSpinProps extends SpinProps {
    children?: React.ReactNode
}
// 封装组件ｔｙｐｅ
// ｛[string | number]:any｝ａｎｙ对象
export type anyObj = Record<string | number, any>;
// ()=>{}ａｎｙ函数、方法
export type anyFunc = (...prams: any[]) => any;
//  (any)=>{}T函数、方法
export type anyFuncRes<T> = (...prams: any[]) => T;

// 展开ｔａｂｌｅ入参接口
export interface expandTableProps {
    // 列表数据源Ｌｉｓｔ
    dataSource: anyObj[],
    // 列表数据列Ｌｉｓｔ
    columns: anyObj[],
    // 列表ｋｅｙ
    rowKey: string,
    // 列表加载控制
    laoding: boolean,
    // 展开一列表列Ｌｉｓｔ
    childColumns?: anyObj[],
    // 展开一列列表数据源ｋｅｙ
    childDataKey?: string,
    // 展开一列表ｋｅｙ
    childDataRowKey?: string,
    // 展开一行列表ｔａｂｌｅ其他属性透传
    childTableProps?: anyObj,
    // 展开判断条件方法
    ifExpand?: anyFuncRes<boolean>,
    // 列表分页
    pagination?: anyObj,
    // 分页总条数显示
    // showTotal?:anyFunc | string,
    showTotal?: anyFuncRes<string>,
    // 列表其他属性透传
    tableProps?: anyObj,
    // 列表行展开其他属性透传
    expandable?: anyObj,
}
export interface pageTabsProps {
    // ｔａｂｓ标签页ｌｉｓｔ
    tabPaneList?: string[],
    // ｔａｂ标签激活ｋｅｙ
    activeKey: string | number,
    setActiveKey?: anyFunc,
    unpublishTotal?: string | number,
}